package com.pethome.pet.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pethome.pet.domain.PetLost;
import com.pethome.pet.mapper.PetLostMapper;
import com.pethome.pet.service.IPetLostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 丢失宠物信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-02
 */
@Service
public class PetLostServiceImpl extends ServiceImpl<PetLostMapper, PetLost> implements IPetLostService
{
    @Autowired
    private PetLostMapper petLostMapper;

    /**
     * 查询丢失宠物信息
     * 
     * @param petLostId 丢失宠物信息主键
     * @return 丢失宠物信息
     */
    @Override
    public PetLost selectPetLostByPetLostId(Long petLostId)
    {
        return petLostMapper.selectPetLostByPetLostId(petLostId);
    }

    /**
     * 查询丢失宠物信息列表
     * 
     * @param petLost 丢失宠物信息
     * @return 丢失宠物信息
     */
    @Override
    public List<PetLost> selectPetLostList(PetLost petLost)
    {
        return petLostMapper.selectPetLostList(petLost);
    }

    /**
     * 新增丢失宠物信息
     * 
     * @param petLost 丢失宠物信息
     * @return 结果
     */
    @Override
    public int insertPetLost(PetLost petLost)
    {
        return petLostMapper.insertPetLost(petLost);
    }

    /**
     * 修改丢失宠物信息
     * 
     * @param petLost 丢失宠物信息
     * @return 结果
     */
    @Override
    public int updatePetLost(PetLost petLost)
    {
        return petLostMapper.updatePetLost(petLost);
    }

    /**
     * 批量删除丢失宠物信息
     * 
     * @param petLostIds 需要删除的丢失宠物信息主键
     * @return 结果
     */
    @Override
    public int deletePetLostByPetLostIds(Long[] petLostIds)
    {
        return petLostMapper.deletePetLostByPetLostIds(petLostIds);
    }

    /**
     * 删除丢失宠物信息信息
     * 
     * @param petLostId 丢失宠物信息主键
     * @return 结果
     */
    @Override
    public int deletePetLostByPetLostId(Long petLostId)
    {
        return petLostMapper.deletePetLostByPetLostId(petLostId);
    }
}
